﻿@{
    Layout = "_LayoutPhone";
}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <title>客户详细</title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.3/css/bootstrap.min.css">
    <!-- customer-details CSS -->
    <link rel="stylesheet" href="~/GoTRI/css/mobiscroll.custom.min.css">
    <link rel="stylesheet" href="~/GoTRI/css/customer-details.css?v=3">
    <link rel="stylesheet" href="~/GoTRI/css/tel-note.css">
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="~/GoTRI/js/jquery-3.2.1.min.js"></script>
    <script src="~/GoTRI/js/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.3/js/bootstrap.min.js"></script>

    <script>
        $(document).ready(function () {
            BindGenJinJiLu();
            var a = window.screen.height;
            a = a - 130;
            $("#div_body").attr("style", "height:" + a + "px;");
        });

        function BindGenJinJiLu() {
            $.ajax({
                type: "POST",
                url: "../PhoneTongJi/ZyBangDingShuJu",
                cache: false,  //禁用缓存
                dataType: "json",
                success: function (result) {
                    console.log(result);
                    var right = "";
                    for (var i = 0; i < result.length; i++) {
                        var zhiyeguwen = "";
                        zhiyeguwen += "" +
                            "<div class=\"item-foot\" style=\"margin-bottom: 5px;\">" +
                            "<span>确认状态</span>-是否到访：" +
                            "<span>" + result[i].QueRenZhuangTai + "</span>" +
                            "</div>" +
                            "<div class=\"item-foot\" style=\"margin-bottom: 5px;\">" +
                            "<span>客户名称:" + result[i].KeHuXingMing + "</span>" +
                            "</div>";

                        right += "<div class=\"right-item\">" +
                            "<div class=\"item-tit\">" +
                            "<div class=\"tit-left\"><div><div class=\"circle actived\"><div></div></div></div><span>" + result[i].XiaoShouDongZuo + "</span></div><span>" + result[i].CaoZuoShiJian + "</span>" +
                            //"<span>" + result[i].XiaoShouDongZuo + "</span>" +
                            //"<span>" + result[i].CaoZuoShiJian+"</span>" +
                            "</div>" +
                            "<div class=\"tit-body\">" +
                            "<div class=\"item-content\">" + result[i].MiaoShu + "</div>" + zhiyeguwen +
                            "<div class=\"item-foot\">" +
                            "(<span>" + ShouJi(result[i].ShouJiHaoMa) + "</span>)" +
                            "</div>" +
                            "</div>" +
                            "</div>";
                    }
                    $("#div_XiaoShouJiLu").html(right);
                }
            });
        }

        function ShouJi(cellValue) {
            if (Number(cellValue) && String(cellValue).length === 11) {

                var mobile = String(cellValue)

                var reg = /^(\d{3})\d{4}(\d{4})$/

                return mobile.replace(reg, '$1****$2')

            } else {

                return cellValue

            }

        }
    </script>
</head>
<body>
    <header style="width: 100%; height: 4rem; background-color: rgb(255,135,0);top:0px;position: fixed;z-index: 1;">
        <a href="../PhoneGeRen/GeRenXinXi">
            <img src="~/GoTRI/img/left.png" alt="" style="float: left;
            width: 1rem;
            height: 2rem;
            margin-left: 1rem;
            margin-top: 1rem;
            position:absolute;
	        left:0px;
	        top:0px;
	        z-index:1;">
        </a>
        <div style=" width: 100%; height: 4rem; line-height: 4rem; text-align: center; color: #fff; font-size: 1.3rem;">确认到访记录</div>
    </header>
    <div style="width:1px;padding-bottom:50px"></div>
    <script>
        $(".yi").attr("hidden", "");
    </script>
    <div style="width:100%; overflow-y:scroll" id="div_body">
        <div class="main-rlist" id="ul_main">
            <!-- 基本信息、客户轨迹 -->
            <div class="info-details">
                <div class="tab-content">
                    <!-- 客户轨迹 -->
                    <div id="custrack" class="tab-pane active" style="margin-bottom: 60px">
                        <div class="track-body">
                            <div class="body-right" id="div_XiaoShouJiLu">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div style="margin-bottom: 50px;padding-bottom:1px"></div>
</body>
</html>